package com.ywk.pattern._18_memento;

public class Main {
    public static void main(String[] args) {
        GameRole role = new GameRole();
        role.GetInitState();
        role.StateDisplay();

        RoleStateCaretaker caretaker = new RoleStateCaretaker();
        caretaker.setMemento(role.SaveState());
        role.Fight();
        role.StateDisplay();
        role.RecoveryState(caretaker.getMemento());
        role.StateDisplay();
    }
}
